<?php /* Smarty version Smarty-3.1.14, created on 2017-08-19 11:48:01
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\user_sh_edit.html" */ ?>
<?php /*%%SmartyHeaderCode:27046599501263e3216-62792553%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4fbd0dba33b21e36372e8c2ddbf52d640af405a3' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\user_sh_edit.html',
      1 => 1503110631,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '27046599501263e3216-62792553',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_59950126429636_13658358',
  'variables' => 
  array (
    'quyu' => 0,
    'edit' => 0,
    'ranks' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59950126429636_13658358')) {function content_59950126429636_13658358($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<style>
input {	width: 200px;}
textarea {	width: 350px;	height: 100px;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>编辑商户</h3>
  </div>
</div>
<div class="fixed_bottom">
  <form method="post" action="" enctype="multipart/form-data" id="aspnetForm" name="form1">
    <table style=" width:100%;" cellpadding="0" cellspacing="0" class="table tb-type2">
      <tbody>
        <tr>
          <td class="firtd">所属区域:</td>     
          <td>
          	<select name="r_id" id="r_id">
            <?php  $_smarty_tpl->tpl_vars['ranks'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['ranks']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['quyu']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['ranks']->key => $_smarty_tpl->tpl_vars['ranks']->value){
$_smarty_tpl->tpl_vars['ranks']->_loop = true;
?>
            <option <?php if ($_smarty_tpl->tpl_vars['edit']->value['r_id']==$_smarty_tpl->tpl_vars['ranks']->value['r_id']){?> selected="selected" required <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['ranks']->value['r_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['ranks']->value['r_name'];?>
</option>
            <?php } ?>
            </select>
          </td>
        </tr>
        <tr>
          <td class="firtd">店铺名称:</td>
          <td>
          	<input type="text" name="shop_name" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_name'];?>
"  placeholder="请输入店铺名称" id='shop_name'<?php if ($_smarty_tpl->tpl_vars['edit']->value['s_id']){?> disabled="disabled" <?php }?>required>&nbsp;&nbsp;&nbsp;&nbsp;
            <br /><span class="shop_name" class="notice-span" >支持中文、字母、数字的组合,2-20个字符</span> 
          </td>
        </tr>
        <tr>
          <td class="firtd"> 店铺密码:</td>
          <td><input type="password" name="shop_password" value="" maxlength="20" required>
          <br /><span class="notice-span" id="pass">不输或为空,默认密码为123456</span></td>

        </tr>
        <tr>
          <td class="firtd"> 确认密码:</td>
          <td><input type="password" name="repassword" value="" maxlength="20" required><span id="repassword"></span>
          <br/><span class="notice-span" id="repass">二次输入的密码必须一致</span>
          </td>
        </tr>
       
         <tr>
          <td class="firtd"> 营业时间</td>
          <td><input type="text" name="start_time" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['start_time'];?>
" required></td>
        </tr>
        <tr>
          <td class="firtd">商铺地址</td>
          <td><input type="text" name="shop_address" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_address'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 商铺起送价</td>
          <td><input type="text" name="start_price" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['start_price'];?>
" required>&nbsp;&nbsp;&nbsp;&nbsp;<span id="email"></span></td>
        </tr>
        <tr>
          <td class="firtd"> 是否开启</td>
          <td><input style="width:15px" type="radio" name="shop_zt" <?php if ($_smarty_tpl->tpl_vars['edit']->value['shop_zt']==0){?>checked<?php }?> value="0"> 是 &nbsp;&nbsp;&nbsp;&nbsp;
          <input style="width:15px" <?php if ($_smarty_tpl->tpl_vars['edit']->value['shop_zt']==1){?>checked<?php }?> type="radio" name="shop_zt" value="1"> 否
          </td>
        </tr>
        <tr>
          <td class="firtd"> 邮箱</td>
          <td><input type="text" name="shop_email" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_email'];?>
" required>&nbsp;&nbsp;&nbsp;&nbsp;<span id="email"></span></td>
        </tr>
        <tr>
          <td class="firtd"> 电话</td>
          <td><input type="text" name="shop_tel" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_tel'];?>
" required>&nbsp;&nbsp;&nbsp;&nbsp;<span id="email"></span></td>
        </tr>
        <tr>
          <td class="firtd"> 是否默认</td>
          <td><input style="width:15px" type="radio" name="shop_tj" <?php if ($_smarty_tpl->tpl_vars['edit']->value['shop_tj']==1){?>checked<?php }?> value="0"> 是 &nbsp;&nbsp;&nbsp;&nbsp;
          <input style="width:15px" <?php if ($_smarty_tpl->tpl_vars['edit']->value['shop_tj']==0){?>checked<?php }?> type="radio" name="shop_tj" value="1"> 否</td>
        </tr>
        <tr>
          <td class="firtd"> 用户头像</td>
          <td><img width="100" height="100" src="../<?php if ($_smarty_tpl->tpl_vars['edit']->value['shop_img']){?><?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_img'];?>
<?php }else{ ?>images/mrimgs.jpg<?php }?>" /><br>
          <br>
          <input type='file' name='shop_img' size='35' />
          <input type='hidden' name='shop_imgyx' value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['shop_img'];?>
" size='35' /></td>
        </tr>
        <tr>
          <td class="style1">&nbsp;</td>
          <td>
          	  <input type="hidden" name="act" value="insert">
              <input type="hidden" name="s_id" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['s_id'];?>
">
              <a href="JavaScript:void(0);" class="btn" onclick="reset()"><span>重置</span></a>
              <a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认提交</span></a>
          </td>
        </tr>
      </tbody>
    </table>
    <input type="reset" id="cz" style="display: none;">
    <input type="submit" id="tj" style="display:none;";>
  </form>
</div>
</body>
<script>
    // 重置方法
    function reset(){
        $('input').val('');
        $('textarea').text('');
    }
	
	//验证密码是否一致
	$("input[name=repassword]").blur(function(){
		$(this).data('type','1');
		val=$("input[name=shop_password]").val();
		vals=$(this).val();
			if(val==vals){
				$(this).next('span').html('正确');
				$(this).next('span').css('color','#90B71B')
				$(this).css('border-color','#ccc');
				$(this).data('type','2');
			}else{
				$(this).next('span').html('两次密码输入不一致');
				$(this).next('span').css('color','#f00')
				$(this).css('border-color','#f00');
			}
	});
  $("#shop_name").blur(function(){
    r_id=$("#r_id").val();
    shop_name= $("#shop_name").val();
    $.post("user_sh.php",{act:'name',r_id:r_id,shop_name:shop_name},function(data){
      if(data=='1'){
          $(".shop_name").css("color","#f00");
          $(".shop_name").html("该区域下商户名称已存在");
          $("input[name=shop_name]").css("border-color","#f00");
          $("#shop_name").focus();
      }else{
          $(".shop_name").css("color","#000");
          $(".shop_name").html("支持中文、字母、数字的组合,2-20个字符");
          $("input[name=shop_name]").css("border-color","#ccc");
      }
   });
  });

</script>
</html><?php }} ?>